package cn.panda.edu.service.impl;

import cn.panda.edu.dao.SectionTestMapper;
import cn.panda.edu.model.SectionTest;
import cn.panda.edu.service.SectionTestService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 
 * 类描述：业务逻辑层SectionTest实现类  
 */
@Service
public class SectionTestServiceImpl implements SectionTestService {

	@Autowired
    SectionTestMapper sectionTestMapper;
	
	@Override
	public PageInfo<SectionTest> listSectionTestByPage(Integer pageIndex, Integer pageSize) {
		// TODO Auto-generated method stub
		PageHelper.startPage(pageIndex,pageSize);
		List<SectionTest> list = sectionTestMapper.listSectionTest();
		PageInfo<SectionTest> pageInfo = new PageInfo<>(list);
		return pageInfo;
	}

	@Override
	public void saveSectionTest(Map<String, Object> map) {
		// TODO Auto-generated method stub
		sectionTestMapper.insertSectionScore(map);
	}
	

}
